module odefu.engine.states.StateQueue;

import odefu.engine.states.State;

public class StateQueue
{
	private State[] states = [];
	
	public void addState(State state)
	{
		states ~= state;
	}
	
	public State nextState()
	{
		return hasStates() ? states[0] : null;
	}

	public void removeNext()
	{
		states = states[1 .. $];
	}
	
	public bool hasStates()
	{
		return states.length > 0;
	}
}